<template>
  <div>
    <edu-title title="我的考试"></edu-title>
    <el-tabs v-model="activeTab" @tab-click="changeTabs">
      <!-- <el-tab-pane label="全部" name="all">
     
          </el-tab-pane>
          <el-tab-pane label="未完成" name="2">
        
          </el-tab-pane>
           <el-tab-pane label="已完成" name="3">
        
          </el-tab-pane> -->
    </el-tabs>

    <!--<testItem class="item" v-for="(test,index) in list" :key="index" :testItem="test"></testItem> -->
    <el-empty v-if="list.length<=0"></el-empty>
      <el-pagination
      class="pagination"
      @current-change="getTestList"
      :page-size="pageSize"
      hide-on-single-page
      layout="prev, pager, next, jumper"
      :total="total"
    >
    </el-pagination>
    
      </div>
</template>

<script>
import eduTitle from "/@/components/userCenter/title.vue";
//import testItem from "./components/testItem.vue";
//import { testList} from "@/api/student/test";
export default {
  components: {
    eduTitle,
    //testItem,
  },
  data() {
    return {
      activeTab: "all",
      list: [],
      total: 0,
      pageSize: 20,
   
    };
  },
  mounted(){
      this.getTestList()
  },
  methods: {
    changeTabs() {
      // this.activeTab = name
    },
 
    getTestList(page = 1, params = {}) {
      // let offset = (page - 1) * this.pageSize;
      // testList({
      //   offset: offset,
      //   size: this.pageSize,
      //   status:0,
      //   ...params,
      // })
      //   .then((res) => {
      //     const { studyProgressLogs, total } = res;
      //     this.list = studyProgressLogs || [];
      //     this.total = total;
      //   })
      //   .catch((err) => {
      //     console.error(err);
      //   });
    },
  },
};
</script>

<style lang="scss" scoped>
.item{
    margin-bottom: 20px;
}
</style>